<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PxBinaryConverter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="PhysXLogoBlack.png"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classPxBinaryConverter.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classPxBinaryConverter-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PxBinaryConverter Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__extensions.html">Extensions</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Binary converter for serialized streams.  
 <a href="classPxBinaryConverter.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="PxBinaryConverter_8h_source.html">PxBinaryConverter.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac45504933db13e78c7dd12e68fab304f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxBinaryConverter.html#ac45504933db13e78c7dd12e68fab304f">release</a> ()=0</td></tr>
<tr class="memdesc:ac45504933db13e78c7dd12e68fab304f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases binary converter.  <a href="#ac45504933db13e78c7dd12e68fab304f">More...</a><br /></td></tr>
<tr class="separator:ac45504933db13e78c7dd12e68fab304f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba26eda3b46071eca65fa38cabee2a09"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxBinaryConverter.html#aba26eda3b46071eca65fa38cabee2a09">setReportMode</a> (<a class="el" href="structPxConverterReportMode.html#aabe051209d39df379f39bbe45bf4f1a3">PxConverterReportMode::Enum</a> mode)=0</td></tr>
<tr class="memdesc:aba26eda3b46071eca65fa38cabee2a09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets desired report mode.  <a href="#aba26eda3b46071eca65fa38cabee2a09">More...</a><br /></td></tr>
<tr class="separator:aba26eda3b46071eca65fa38cabee2a09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a475c6a6dc11b63b3570f2fc5d21b5c0e"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxBinaryConverter.html#a475c6a6dc11b63b3570f2fc5d21b5c0e">setMetaData</a> (<a class="el" href="classPxInputStream.html">PxInputStream</a> &amp;srcMetaData, <a class="el" href="classPxInputStream.html">PxInputStream</a> &amp;dstMetaData)=0</td></tr>
<tr class="memdesc:a475c6a6dc11b63b3570f2fc5d21b5c0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setups source and target meta-data streams.  <a href="#a475c6a6dc11b63b3570f2fc5d21b5c0e">More...</a><br /></td></tr>
<tr class="separator:a475c6a6dc11b63b3570f2fc5d21b5c0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac39cc433f7d1db69e1c17e401adec9cc"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxBinaryConverter.html#ac39cc433f7d1db69e1c17e401adec9cc">compareMetaData</a> () const =0</td></tr>
<tr class="memdesc:ac39cc433f7d1db69e1c17e401adec9cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test utility function to compare two sets of meta data.  <a href="#ac39cc433f7d1db69e1c17e401adec9cc">More...</a><br /></td></tr>
<tr class="separator:ac39cc433f7d1db69e1c17e401adec9cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9890d7f61fceb47d154e203291cd08fd"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxBinaryConverter.html#a9890d7f61fceb47d154e203291cd08fd">convert</a> (<a class="el" href="classPxInputStream.html">PxInputStream</a> &amp;srcStream, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> srcSize, <a class="el" href="classPxOutputStream.html">PxOutputStream</a> &amp;targetStream)=0</td></tr>
<tr class="memdesc:a9890d7f61fceb47d154e203291cd08fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts binary stream from source platform to target platform.  <a href="#a9890d7f61fceb47d154e203291cd08fd">More...</a><br /></td></tr>
<tr class="separator:a9890d7f61fceb47d154e203291cd08fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a76e9b36969e46ef131f22d2d95aa31cb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxBinaryConverter.html#a76e9b36969e46ef131f22d2d95aa31cb">PxBinaryConverter</a> ()</td></tr>
<tr class="separator:a76e9b36969e46ef131f22d2d95aa31cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30333f47d0897b3728442e915eaaba81"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxBinaryConverter.html#a30333f47d0897b3728442e915eaaba81">~PxBinaryConverter</a> ()</td></tr>
<tr class="separator:a30333f47d0897b3728442e915eaaba81"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Binary converter for serialized streams. </p>
<p>The binary converter class is targeted at converting binary streams from authoring platforms, such as windows, osx or linux to any game runtime platform supported by PhysX. Particularly it is currently not supported to run the converter on a platforms that has an endian mismatch with the platform corresponding to the source binary file and source meta data.</p>
<p>If you want to use multiple threads for batch conversions, please create one instance of this class for each thread.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxSerialization.html#a9014b476bfd9e3e9bc7ea755df232bfd" title="Creates binary converter for re-targeting binary-serialized data. ">PxSerialization.createBinaryConverter</a> </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a76e9b36969e46ef131f22d2d95aa31cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76e9b36969e46ef131f22d2d95aa31cb">&#9670;&nbsp;</a></span>PxBinaryConverter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">PxBinaryConverter::PxBinaryConverter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a30333f47d0897b3728442e915eaaba81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30333f47d0897b3728442e915eaaba81">&#9670;&nbsp;</a></span>~PxBinaryConverter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual PxBinaryConverter::~PxBinaryConverter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac39cc433f7d1db69e1c17e401adec9cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac39cc433f7d1db69e1c17e401adec9cc">&#9670;&nbsp;</a></span>compareMetaData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool PxBinaryConverter::compareMetaData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Test utility function to compare two sets of meta data. </p>
<p>The meta data needs to be set before calling the compareMetaData method. This method will issue <a class="el" href="structPxErrorCode.html#a01157d5d2eca2cede61ecbbc32c7b2a3ab822d9fb3b06cb1032cc65da86bef532" title="An informational message. ">PxErrorCode::eDEBUG_INFO</a> messages if mismatches are encountered.</p>
<dl class="section return"><dt>Returns</dt><dd>True if meta data is equivalend </dd></dl>

</div>
</div>
<a id="a9890d7f61fceb47d154e203291cd08fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9890d7f61fceb47d154e203291cd08fd">&#9670;&nbsp;</a></span>convert()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool PxBinaryConverter::convert </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxInputStream.html">PxInputStream</a> &amp;&#160;</td>
          <td class="paramname"><em>srcStream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>srcSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classPxOutputStream.html">PxOutputStream</a> &amp;&#160;</td>
          <td class="paramname"><em>targetStream</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Converts binary stream from source platform to target platform. </p>
<p>The converter needs to be configured with source and destination meta data before calling the conversion method. The source meta data needs to correspond to the same platform as the source binary data.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">srcStream</td><td>Source stream </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">srcSize</td><td>Number of bytes to convert </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">targetStream</td><td>Target stream</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if success </dd></dl>

</div>
</div>
<a id="ac45504933db13e78c7dd12e68fab304f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac45504933db13e78c7dd12e68fab304f">&#9670;&nbsp;</a></span>release()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PxBinaryConverter::release </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Releases binary converter. </p>

</div>
</div>
<a id="a475c6a6dc11b63b3570f2fc5d21b5c0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a475c6a6dc11b63b3570f2fc5d21b5c0e">&#9670;&nbsp;</a></span>setMetaData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool PxBinaryConverter::setMetaData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxInputStream.html">PxInputStream</a> &amp;&#160;</td>
          <td class="paramname"><em>srcMetaData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classPxInputStream.html">PxInputStream</a> &amp;&#160;</td>
          <td class="paramname"><em>dstMetaData</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Setups source and target meta-data streams. </p>
<p>The source meta data provided needs to have the same endianness as the platform the converter is run on. The meta data needs to be set before calling the conversion method.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">srcMetaData</td><td>Source platform's meta-data stream </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dstMetaData</td><td>Target platform's meta-data stream</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if success</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxSerialization.html#a86026f68eb651de87e4a7720bc708893" title="Dumps the binary meta-data to a stream. ">PxSerialization::dumpBinaryMetaData</a> </dd></dl>

</div>
</div>
<a id="aba26eda3b46071eca65fa38cabee2a09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba26eda3b46071eca65fa38cabee2a09">&#9670;&nbsp;</a></span>setReportMode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PxBinaryConverter::setReportMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPxConverterReportMode.html#aabe051209d39df379f39bbe45bf4f1a3">PxConverterReportMode::Enum</a>&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets desired report mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Report mode </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxBinaryConverter_8h_source.html">PxBinaryConverter.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classPxBinaryConverter.html">PxBinaryConverter</a></li>
    <li class="footer">Copyright &copy; 2008-2021 NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, CA 95051 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a></li>
  </ul>
</div>
</body>
</html>
